package com.gsit.job.domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;

import lombok.Data;

@Entity
@Data
@NamedQueries({@NamedQuery (name= "Person.findAll",query= "select person from Person person")})
public class Person {
	
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private Long id;
	
	@Column(name = "RESUME_ID",unique=true)
	private String resid;
	
	@Column(name = "USER_ID",unique = true)
	private String uid;
	
	@Column(name = "URL")
	private String url;
	
	@Column(name = "EMAIL")
	private String email;
	
	@Column(name = "PHONE_NUMBER")
	private String phoneNumber;
	
	@Column(name = "NAME")
	private String name;
	
	@Column(name = "IS_RESUME_CAPTURED")
	private Boolean isResumeCaptured;
	
	@Column(name = "CREATED_DATE")
	private Date createdDate;
	
	@Column(name = "RESUME_CAPTURE_DATE")
	private Date resumeCaptureDate;
	
	@Column(name = "RESUME_CAPTURE_STATE")
	@Enumerated(EnumType.STRING)
	private ResumeCaptureState resumeCaptureState;
	
	@Override
	public String toString() {
		return "Person [resid=" + resid + ", uid=" + uid + ", url=" + url + "]";
	}

}
